package com.cby.operation.login.ui

import com.cby.operation.common.ui.BaseWebDialogFragment
import com.cby.operation.login.js.LoginJsInterface
import com.cby.operation.sdk.JS_INTERFACE_NAME
import com.cby.operation.sdk.SdkConfiguration
import com.cby.operation.sdk.getWebLoginUrl

/**
 * @description: LoginWebDialogFragment
 *
 * @author ChenBaoyang
 * @date 7/23/21 11:42
 */
class LoginWebDialogFragment : BaseWebDialogFragment() {

    override fun setWebContent() {
        val jsInterface = LoginJsInterface(activity)
        webView.addJavascriptInterface(jsInterface, JS_INTERFACE_NAME)
        val url: String = getWebLoginUrl(SdkConfiguration.orientation)
        webView.loadUrl(url)
    }
}